package com.terry.sp.dao;

import com.terry.sp.core.Mapper;
import com.terry.sp.model.PrintTask;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import javax.websocket.server.ServerEndpoint;
import java.util.List;

public interface PrintTaskMapper extends Mapper<PrintTask> {

    PrintTask getTaskByDeviceId(int deviceId);

    @Update("UPDATE print_task SET state = 2 WHERE Id=#{taskId}")
    void  printTaskById(int taskId);

    @Update("UPDATE print_task SET state = 3 WHERE id=#{taskId}")
    void finishTaskById(int taskId);

}